"use strict";

const BaseModel = require("../basics/mysql/mapper");
class HomeModel extends BaseModel {
  constructor(cloud) {
    super(cloud, "prize_address");
  }

  /**
   * 获取实例
   * @param {*} cloud 
   */
  static getInstant(cloud) {
    return new HomeModel(cloud);
  }

  /**
   * 查询单条
   * @param {*} openId 
   */
  async selectOne(openId) {
    const ex = this.createExample();
    ex.criteria.andEqual("openId", openId);
    return await this.selectOneByExample(ex);
  }
}

module.exports = HomeModel;